package com.bawei.lib_http

import com.zyj.retrofit.adapter.FlowCallAdapterFactory
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class TokenRetrofitImpl:BaseRetrofitImpl() {
    override fun getRetrofit(): Retrofit {
        return Retrofit.Builder()
            .client(getCilent()
                .addInterceptor { 
                    val build = it.request().newBuilder().addHeader(Count.BASE_TOKEN, "").build()
                    it.proceed(build)
                }
                .build())
            .baseUrl(Count.BASE_URL)
            .addConverterFactory(GsonConverterFactory.create())
            .addCallAdapterFactory(FlowCallAdapterFactory.create())
            .build()
    }
}